<script>
	import db from './js_sdk/uni-clientDB/index.js'
	export default {
		onLaunch: function() {
			db.auth.on('refreshToken', function({
				token,
				tokenExpired
			}) {
				console.log(token) 
				uni.setStorageSync('uni_id_token', token)
				uni.setStorageSync('uni_id_token_expired', tokenExpired)
			})
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	page {
		font-size: 14px;
	}

	.content {
		padding: 15px;
		font-size: 14px;
	}

	.content .text {
		margin-bottom: 15px;
		padding: 5px 0px;
	}

	.content button,
	.content input {
		margin-bottom: 15px;
	}

	.content input {
		height: 40px;
		line-height: 40px;
		padding-left: 10px;
		border: solid 1px #DDDDDD;
		border-radius: 5px;
		margin-bottom: 15px;
	}

	.link {
		text-align: center;
		text-decoration: underline;
		color: #007AFF;
	}

	.empty-tips {
		padding: 15px 0px;
		font-size: 14px;
		text-align: center;
	}

	.article-title {
		text-align: center;
		line-height: 1.2em;
		font-size: 16px;
		padding: 15px;
	}

	.article-content {
		line-height: 1.2em;
		font-size: 14px;
		padding: 0px 15px 15px 15px;
		word-break: break-all;
	}

	.article-comment {
		padding: 10px 15px 120px 15px;
	}

	.article-comment-item {
		margin-bottom: 10px;
	}

	.article-comment-item .user-info {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.article-comment-item .user-info .avatar {
		width: 40px;
		height: 40px;
		border-radius: 20px;
		margin-right: 10px;
	}

	.article-comment-item .user-info .username {
		font-size: 14px;
		line-height: 1.3em;
		flex: 1;
	}

	.article-comment-item .comment-content {
		margin-top: 10px;
		font-size: 14px;
		line-height: 1.3em;
	}

	.article-comment-item .comment-at {
		color: #007AFF;
	}

	.article-comment-item .comment-action {
		margin-top: 5px;
		text-align: right;
	}

	.article-comment-item .comment-action .action {
		margin-left: 10px;
	}

	.article-comment-zan,
	.article-comment-add {
		position: fixed;
		width: 50px;
		height: 50px;
		right: 15px;
		top: 50%;
		text-align: center;
		line-height: 50px;
		border-radius: 25px;
		font-size: 14px;
		background-color: #007AFF;
		color: #FFFFFF;
	}

	.article-comment-zan {
		margin-top: -55px;
	}

	.article-comment-add {
		margin-top: 5px;
	}

	.article-comment-input {
		position: fixed;
		width: 100%;
		height: 40px;
		box-sizing: border-box;
		padding: 10px 15px;
		bottom: 0;
		left: 0;
		border-top: solid 1px #DDDDDD;
		background-color: #FFFFFF;
	}

	.article-comment-input input {
		height: 20px;
		line-height: 20px;
	}

	.article-comment-input .not-login {
		font-size: 14px;
		height: 20px;
		line-height: 20px;
	}
</style>
